<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1" 
	import="ass.beans.*" 
	import="java.util.*"
	
	%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

	<%@ include file="header.html"%>
	<%@ include file="userNavBar.html"%>
	
	<%
	List<MovieBean> movieBeanList = (List<MovieBean>)request.getAttribute("movieBeanList");
	%>
	<div align="center">
	<table  width="400" border="0">
		<%	
				if (movieBeanList.isEmpty()){
					out.print("search does not return any result<br/>"+
							  "<a href='userSearch.jsp'> click here to search again. </a>");
				}else{
					for (MovieBean movieBean : movieBeanList){
						out.print("<tr>" +
								  "<td> title = "+ movieBean.getMovie_title() + "<br/>" +
								  		"poster = " + "<br/>" +
								  		"main actor = "+ movieBean.getMovie_actor() + "<br/>" +
								  		"genre = "+ movieBean.getMovie_genre() + "<br/>" +
								  		"rating = "+ movieBean.getMovie_rating() + "<br/>" +
								  		"link = <a href='MovieDetail?id="+ movieBean.getMovie_id()+"'>Go to the movie detail</a>" + "<br/><br/><br/>" +
								  "</td>"+
								  "</tr>");
					}
				}
			
			%>

	</table>
	</div>

</body>
</html>